Skip to main content

Timing

Example​

import olem

print("Waiting 2 seconds")
olem.delay_ms(2000)

# Measure how long a movement takes
start = olem.get_time_ms()
olem.move(100, 0, 0)
olem.wait_stop_moving()
print("The movement took " + str(olem.get_time_ms() - start) + " ms")

Functions​

delay_ms(delay)​

Wait for the given duration. The game can still be stopped during the wait.

ParameterDescription
delayduration in ms

get_time_ms()​

Returns: time since OLEM started in ms